#!/usr/bin/env python

from PIL import Image
import sys, re

im = Image.open('oxygen.png')
w, h = im.size
print 'Width = %d, Height = %d' %(w, h)
y = 50
text = ''
for x in range(2, 606, 7):
    text += chr(im.getpixel((x, y))[0])
l = re.findall('\d+', text)
for num in l:
    sys.stdout.write(chr(int(num)))
sys.stdout.write('\n')
